//项目api的统一管理
import request from './request'

//左侧表格请求数据
export default {
  getTableData() {
    return request({
      // url: '/api/home/getTableData',
      url: '/home/getTableData',
      method: 'get',
    });
  },
  getCountData() {
    return request({
      // url: '/api/home/getCountData',
      url: '/home/getCountData',
      method: 'get',
    });
  },
  getChartData() {
    return request({
      // url: '/api/home/getChartData',
      url: '/home/getChartData',
      method: 'get',
    });
  },
  getUserData(data) {
    return request({
      // url: '/api/home/getUserData',
      url: '/home/getUserData',
      method: 'get',
      data,
    });
  },
  deleteUser(data) {
    return request({
      // url: '/api/home/getUserData',
      url: "/user/deleteUser",
      method: "get",
      data,
    });
  },
  addUser(data) {
    return request({
      // url: '/api/home/getUserData',
      url: "/user/addUser",
      method: "post",
      data,
    });
  },
  editUser(data) {
    return request({
      // url: '/api/home/getUserData',
      url: "/user/editUser",
      method: "post",
      data,
    });
  },
  getMenu(params) {
    return request({
      url: '/permission/getMenu',
      method: 'post',
      data: params
    })
  },
};